<? if (empty($currentSection)) $currentSection=null; ?>

<?	require(sfConfig::get('sf_plugins_dir')."/bertaTwigPlugin/lib/dirtyRequire.php"); ?>
<?

    switch ($type){
        case "in-standalone-entry":
            $twigTemplateName="images-standalone.html";
            break;
        case "in-listed-entry":
        default:
            $twigTemplateName="images-in-list.html";
            break;
    }

    if (!file_exists("{$templatePath}/{$twigTemplateName}")){
        $twigTemplateName="images.html";
    }

    $entryTemplate = $twig->loadTemplate($twigTemplateName);
	$entryTemplate->display(array("currentSection" => $currentSection, "entry" => $entry, "settings" => Settings::getInstance()));
